package com.di;

import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Main {

	public static void main(String[] args) {
		ApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
		
		BeanFactory factory = context;
		MyBean myBean = (MyBean) factory.getBean("myBean");
		
		myBean.run();
	}
}
